package com.example.zhu;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

import org.springframework.transaction.annotation.EnableTransactionManagement;

//@EnableAsync
@SpringBootApplication
@EnableTransactionManagement
public class ProjectApplication extends SpringBootServletInitializer {
    @Override  //这个表示使用外部的tomcat容器
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        // 注意这里要指向原先用main方法执行的启动类
        return builder.sources(ProjectApplication.class);
    }
    public static void main(String[] args) {

        SpringApplication.run(ProjectApplication.class, args);
    }

}
